package net.stogi.common.gwt.frame.client.core;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;

public interface EventBus {

	<H extends EventHandler> HandlerRegistration addHandler(GwtEvent.Type<H> type, H handler);

	void fireEvent(GwtEvent<?> event);

	<H extends EventHandler> H getHandler(GwtEvent.Type<H> type, int index);

	<H extends EventHandler> void removeHandler(GwtEvent.Type<H> type, final H handler);
}
